Optimal. Leaf size=122 \[ -\frac {d-e+f}{36 (x+1)}+\frac {d+e+f}{12 (1-x)}+\frac {d+2 e+4 f}{36 (2-x)}+\frac {1}{36} \log (1-x) (2 d+5 e+8 f)-\frac {1}{432} \log (2-x) (35 d+58 e+92 f)+\frac {1}{108} \log (x+1) (2 d+e-4 f)+\frac {1}{144} \log (x+2) (d-2 e+4 f) \]
________________________________________________________________________________________
Rubi [A] time = 0.22, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {1586, 6742} \begin {gather*} -\frac {d-e+f}{36 (x+1)}+\frac {d+e+f}{12 (1-x)}+\frac {d+2 e+4 f}{36 (2-x)}+\frac {1}{36} \log (1-x) (2 d+5 e+8 f)-\frac {1}{432} \log (2-x) (35 d+58 e+92 f)+\frac {1}{108} \log (x+1) (2 d+e-4 f)+\frac {1}{144} \log (x+2) (d-2 e+4 f) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1586
Rule 6742
Rubi steps
\begin {align*} \int \frac {(2+x) \left (d+e x+f x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx &=\int \frac {d+e x+f x^2}{(2+x) \left (2-x-2 x^2+x^3\right )^2} \, dx\\ &=\int \left (\frac {d+2 e+4 f}{36 (-2+x)^2}+\frac {-35 d-58 e-92 f}{432 (-2+x)}+\frac {d+e+f}{12 (-1+x)^2}+\frac {2 d+5 e+8 f}{36 (-1+x)}+\frac {d-e+f}{36 (1+x)^2}+\frac {2 d+e-4 f}{108 (1+x)}+\frac {d-2 e+4 f}{144 (2+x)}\right ) \, dx\\ &=\frac {d+e+f}{12 (1-x)}+\frac {d+2 e+4 f}{36 (2-x)}-\frac {d-e+f}{36 (1+x)}+\frac {1}{36} (2 d+5 e+8 f) \log (1-x)-\frac {1}{432} (35 d+58 e+92 f) \log (2-x)+\frac {1}{108} (2 d+e-4 f) \log (1+x)+\frac {1}{144} (d-2 e+4 f) \log (2+x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 121, normalized size = 0.99 \begin {gather*} \frac {1}{432} \left (\frac {12 \left (d \left (-5 x^2+6 x+5\right )+e \left (10-4 x^2\right )+2 f \left (-4 x^2+3 x+4\right )\right )}{x^3-2 x^2-x+2}+12 \log (1-x) (2 d+5 e+8 f)-\log (2-x) (35 d+58 e+92 f)+4 \log (x+1) (2 d+e-4 f)+3 \log (x+2) (d-2 e+4 f)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(2+x) \left (d+e x+f x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.32, size = 267, normalized size = 2.19 \begin {gather*} -\frac {12 \, {\left (5 \, d + 4 \, e + 8 \, f\right )} x^{2} - 72 \, {\left (d + f\right )} x - 3 \, {\left ({\left (d - 2 \, e + 4 \, f\right )} x^{3} - 2 \, {\left (d - 2 \, e + 4 \, f\right )} x^{2} - {\left (d - 2 \, e + 4 \, f\right )} x + 2 \, d - 4 \, e + 8 \, f\right )} \log \left (x + 2\right ) - 4 \, {\left ({\left (2 \, d + e - 4 \, f\right )} x^{3} - 2 \, {\left (2 \, d + e - 4 \, f\right )} x^{2} - {\left (2 \, d + e - 4 \, f\right )} x + 4 \, d + 2 \, e - 8 \, f\right )} \log \left (x + 1\right ) - 12 \, {\left ({\left (2 \, d + 5 \, e + 8 \, f\right )} x^{3} - 2 \, {\left (2 \, d + 5 \, e + 8 \, f\right )} x^{2} - {\left (2 \, d + 5 \, e + 8 \, f\right )} x + 4 \, d + 10 \, e + 16 \, f\right )} \log \left (x - 1\right ) + {\left ({\left (35 \, d + 58 \, e + 92 \, f\right )} x^{3} - 2 \, {\left (35 \, d + 58 \, e + 92 \, f\right )} x^{2} - {\left (35 \, d + 58 \, e + 92 \, f\right )} x + 70 \, d + 116 \, e + 184 \, f\right )} \log \left (x - 2\right ) - 60 \, d - 120 \, e - 96 \, f}{432 \, {\left (x^{3} - 2 \, x^{2} - x + 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.33, size = 118, normalized size = 0.97 \begin {gather*} \frac {1}{144} \, {\left (d + 4 \, f - 2 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac {1}{108} \, {\left (2 \, d - 4 \, f + e\right )} \log \left ({\left | x + 1 \right |}\right ) + \frac {1}{36} \, {\left (2 \, d + 8 \, f + 5 \, e\right )} \log \left ({\left | x - 1 \right |}\right ) - \frac {1}{432} \, {\left (35 \, d + 92 \, f + 58 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) - \frac {{\left (5 \, d + 8 \, f + 4 \, e\right )} x^{2} - 6 \, {\left (d + f\right )} x - 5 \, d - 8 \, f - 10 \, e}{36 \, {\left (x + 1\right )} {\left (x - 1\right )} {\left (x - 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 158, normalized size = 1.30 \begin {gather*} \frac {d \ln \left (x +2\right )}{144}-\frac {35 d \ln \left (x -2\right )}{432}+\frac {d \ln \left (x -1\right )}{18}+\frac {d \ln \left (x +1\right )}{54}-\frac {e \ln \left (x +2\right )}{72}-\frac {29 e \ln \left (x -2\right )}{216}+\frac {5 e \ln \left (x -1\right )}{36}+\frac {e \ln \left (x +1\right )}{108}+\frac {f \ln \left (x +2\right )}{36}-\frac {23 f \ln \left (x -2\right )}{108}+\frac {2 f \ln \left (x -1\right )}{9}-\frac {f \ln \left (x +1\right )}{27}-\frac {d}{36 \left (x -2\right )}-\frac {d}{36 \left (x +1\right )}-\frac {d}{12 \left (x -1\right )}-\frac {e}{18 \left (x -2\right )}+\frac {e}{36 x +36}-\frac {e}{12 \left (x -1\right )}-\frac {f}{9 \left (x -2\right )}-\frac {f}{36 \left (x +1\right )}-\frac {f}{12 \left (x -1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 108, normalized size = 0.89 \begin {gather*} \frac {1}{144} \, {\left (d - 2 \, e + 4 \, f\right )} \log \left (x + 2\right ) + \frac {1}{108} \, {\left (2 \, d + e - 4 \, f\right )} \log \left (x + 1\right ) + \frac {1}{36} \, {\left (2 \, d + 5 \, e + 8 \, f\right )} \log \left (x - 1\right ) - \frac {1}{432} \, {\left (35 \, d + 58 \, e + 92 \, f\right )} \log \left (x - 2\right ) - \frac {{\left (5 \, d + 4 \, e + 8 \, f\right )} x^{2} - 6 \, {\left (d + f\right )} x - 5 \, d - 10 \, e - 8 \, f}{36 \, {\left (x^{3} - 2 \, x^{2} - x + 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.13, size = 113, normalized size = 0.93 \begin {gather*} \ln \left (x-1\right )\,\left (\frac {d}{18}+\frac {5\,e}{36}+\frac {2\,f}{9}\right )+\ln \left (x+1\right )\,\left (\frac {d}{54}+\frac {e}{108}-\frac {f}{27}\right )+\ln \left (x+2\right )\,\left (\frac {d}{144}-\frac {e}{72}+\frac {f}{36}\right )-\ln \left (x-2\right )\,\left (\frac {35\,d}{432}+\frac {29\,e}{216}+\frac {23\,f}{108}\right )-\frac {\left (-\frac {5\,d}{36}-\frac {e}{9}-\frac {2\,f}{9}\right )\,x^2+\left (\frac {d}{6}+\frac {f}{6}\right )\,x+\frac {5\,d}{36}+\frac {5\,e}{18}+\frac {2\,f}{9}}{-x^3+2\,x^2+x-2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________